www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\admin_danArticle\D_edit_class.asp

    



<LINK href="../css.css" type=text/css rel=stylesheet>
<%

dir_set="../../"


%>


<!--#include file=../../inc/conn.asp-->
<!--#include file=../../inc/Functionb.asp-->

<!--#include file=../../inc/ajaxLIB.asp-->

<!--#include file=../inc/checkadmin2.asp-->

<!--#include file=../../inc/functionFiless.asp-->



<!--#include file=../../inc/ND_class_function.asp-->


<!--#include file=inc_lanmu_bl.asp-->

<%
AJAXshowLoader()


%>



<style type="text/css">
<!--
.STYLE3 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>


<div id="divProcessing" style="width:200px;height:30px;position:absolute;display:none">
<table border="0" cellpadding="0" cellspacing="1" bgcolor="#000000" width="100%" height="100%"><tr><td bgcolor=#0650D2><marquee align="middle" behavior="alternate" scrollamount="5" style="font-size:9pt"><font color=#FFFFFF>...正在保存远程图片...请等待...</font></marquee></td></tr></table>
</div>
<br />
<div  id="l_list" style="filter:blendTrans(duration=1);  width:774px; z-index:-1; border: 1px dashed #999999;left: 3px; top: 120px; height: 121px;width:730px">

<form action="D_chk_edit_class.asp" method="post" target="_self" name="myform" id="myform">
<table  height="30" width=730 border="0" cellpadding="2" cellspacing="0" bordercolor="#999999" style="border:#999999 1px">

<tr>

<td>

<table  height="30" width=730 border="0" cellpadding="0" cellspacing="0" bordercolor="#999999">


	<%
biao="[ND_danArticle_class]"

sys_content_type=trim(request("sys_content_type"))





set rs44g=server.CreateObject("adodb.recordset")
rs44g.open "select * from ND_channel where sys_content_type_name='"&sys_content_type&"' and lanmu_type='"&lanmu_taba&"'",conn,1,1
if find_dataw(lanmu_taba,rs44g("id"),2)<>"1" and qx_if_max=0 then
response.redirect "../D_suodinguser.asp"
end if
%>






<script src="../../ND_editor/FCKeditor2_5/FCKeditor.js"></script>


<script type="text/javascript">
<!--
function remoteUpload(o) {
	try{
		var strText = GetContentHTML() ;
var divProcessing=document.getElementById("divProcessing");
		var objField = document.getElementsByName("content_UploadText")[0];
		objField.value = strText ;

		if (o) {
			divProcessing.style.top = 800 ;
			divProcessing.style.left = 200 ;
			divProcessing.style.display = "";
			document.remoteuploadb.submit();
		}else{
			divProcessing.style.display = "none";
		}
	}
	catch(e){}
} 

function remoteUploadok() {
	try{
	divProcessing.style.display = "none";
	}
	catch(e){}
}

function GetContentHTML(){
	var strHTML ;
	try{
		var oEditor = FCKeditorAPI.GetInstance('Content') ;
		strHTML = oEditor.GetXHTML()
	}
	catch(e){
		strHTML = '';
	}
	return strHTML
}


var sLinkOriginalFileName = "originalfilename" ;
var sLinkSaveFileName = "savefilename" ;
var sLinkSavePathFileName = "UploadFileList" ;

function addUploadFile(originalFileName, saveFileName, savePathFileName){
	doInterfaceUpload(sLinkOriginalFileName, originalFileName);
	doInterfaceUpload(sLinkSaveFileName, saveFileName);
	doInterfaceUpload(sLinkSavePathFileName, savePathFileName);
}
function doInterfaceUpload(strLinkName, strValue){
	if (strValue=="") return;
	if (strLinkName){
		var objLinkUpload = document.getElementsByName(strLinkName)[0];
		if (objLinkUpload){
			if (objLinkUpload.value!=""){
				objLinkUpload.value = objLinkUpload.value + "|";
			}
			objLinkUpload.value = objLinkUpload.value + strValue;
			objLinkUpload.fireEvent("onchange");
		}
	}
}






function doChange(objText, objDrop){
	if (!objDrop) return;
	//if(document.myform.BriefTopic.selectedIndex<2){
	//	document.myform.BriefTopic.selectedIndex+=1;
	//}
	var str = objText.value;
	var arr = str.split("|");
	var nIndex = objDrop.selectedIndex;
	objDrop.length=1;
	for (var i=0; i<arr.length; i++){
		objDrop.options[objDrop.length] = new Option(arr[i], arr[i]);
	}
	objDrop.selectedIndex = nIndex;
}

//-->
</script>








<%














  function next_cen(pid_list,deepth)



  
set rs=server.CreateObject("adodb.recordset")


pppcid="-123"
if pid_list<>"" then
ppplista=split(pid_list,",")
ppplistaubd=ubound(ppplista)-1
pppcid=ppplista(ppplistaubd)
end if
  
rs.open "select * from "&biao&" where ((deepth="&deepth&" and ((parent_id_list like '%"&pid_list&"%') or (parent_id='"&pppcid&"'))))  and sys_content_type='"&sys_content_type&"'  order by orders asc",conn,1,1

if pid_list<>"" then
lista=split(pid_list,",")
numa=ubound(lista)
p_id=cstr(lista(numa))

else

p_id=0

end if



do while  not rs.eof

pid_list222=rs("parent_id_list")&","&rs("id")&","
deepth222=rs("deepth")+1


    set rs2=server.CreateObject("adodb.recordset")    
rs2.open "select * from "&biao&" where ((deepth="&deepth222&" and ((parent_id_list like '%"&pid_list222&"%') or (parent_id='"&rs("id")&"'))))  and sys_content_type='"&sys_content_type&"'  order by orders asc",conn,1,1


if rs2.eof then


if pid_list<>"" then
lista=split(pid_list,",")
numa=ubound(lista)
p_id=cstr(lista(numa-1))

else

p_id=0

end if
if p_id=0 then p_id=-1


'response.write "<level1 id="""&rs("id")&""" parentTypeID="""&p_id&""" caption="""&rs("ClassName")&""" PRI=""1"" explain="""&rs("id")&"""/>"&vbcrlf

%>



<option value="<%=rs("id")%>" <%if cstr(rs("id"))=cstr(rs22("parent_id")) then response.write "selected"%>>


<%for iiiii1=1 to cint(deepth222)
if iiiii1=cint(deepth222) then
%>
├<%
else
%>
│<%
end if
next

%><%=rs("classname")%>
</option>
 




<%

if not rs.eof then rs.movenext



if rs.eof or rs.bof then

 'response.write "</level0>"


'call next_cen_class(pid_list222,deepth222)

exit function



else




 
 
need_benji_next=1

end if

else




'response.write "<level0 id="""&rs("id")&"""  parentTypeID="""



'if deepth=0 then response.write "-1" else  response.write p_id


'response.write """ caption="""&rs("ClassName")&"""  PRI=""2"" explain="""&rs("id")&""" >"&vbcrlf

%>







<option value="<%=rs("id")%>" <%if cstr(rs("id"))=cstr(rs22("parent_id")) then response.write "selected"%>>


<%for iiiii1=1 to cint(deepth222)
if iiiii1=cint(deepth222) then
%>
├<%
else
%>
│<%
end if
next

%><%=rs("classname")%>
</option>
 











<%









call next_cen(pid_list222,deepth222)







if not rs.eof then rs.movenext

need_benji_next=1

if rs.eof or rs.bof then

'if deepth<>0  then response.write "</level0>"


'call next_cen_class(pid_list222,deepth222)

exit function


end if











end if


if need_benji_next=0 then

exit do

end if

need_benji_next=0
loop



end function




set rs22=server.CreateObject("adodb.recordset")
rs22.open "select * from "&biao&" where id="&request("id"),conn,1,1




%>




<script language="javascript">
function show1(yn){
ss=yn;
if (ss=="1"){
document.getElementById("classurl1").style.display='';
}
else
{
document.getElementById("classurl1").style.display='none';
}


}

</script>


<tr>
<td height="30" align="center" class="adminth" colspan="2"><span class="STYLE3">修改  </span></td>

</tr>

<tr>
<td width="165" height="30" align="center" bgcolor="#ffffff">名称:  </td>
<td width="565" height="30" align="left" bgcolor="#EDF8FE"><input type="text" size=25 value="<%=rs22("classname")%>" name="nme"/></td>
</tr>



<tr>
<td width="165" height="30" align="center" bgcolor="#ffffff">标题模式:  </td>
<td width="565" height="30" align="left" bgcolor="#EDF8FE">

<select size="1" name="ColorModes">
		<option value="0" <%if rs22("titleColor")="0" then response.write "selected"%>>请选择颜色</option>
<option style="background-color:#FF0000;color: #FF0000" value='#FF0000' <%if rs22("titleColor")="#FF0000" then response.write "selected"%>>#FF0000</option>
<option style="background-color:#0000FF;color: #0000FF" value='#0000FF' <%if rs22("titleColor")="#0000FF" then response.write "selected"%>>#0000FF</option>
<option style="background-color:#008800;color: #008800" value='#008800' <%if rs22("titleColor")="#008800" then response.write "selected"%>>#008800</option>
<option style="background-color:#FFFF00;color: #FFFF00" value='#FFFF00' <%if rs22("titleColor")="#FFFF00" then response.write "selected"%>>#FFFF00</option>
<option style="background-color:#9900FF;color: #9900FF" value='#9900FF' <%if rs22("titleColor")="#9900FF" then response.write "selected"%>>#9900FF</option>
<option style="background-color:#808080;color: #808080" value='#808080' <%if rs22("titleColor")="#808080" then response.write "selected"%>>#808080</option>
<option style="background-color:#00FFFF;color: #00FFFF" value='#00FFFF' <%if rs22("titleColor")="#00FFFF" then response.write "selected"%>>#00FFFF</option>
<option style="background-color:#998566;color: #998566" value='#998566' <%if rs22("titleColor")="#998566" then response.write "selected"%>>#998566</option>

<option style="background-color:#FFCC00;color: #FFCC00" value='#FFCC00' <%if rs22("titleColor")="#FFCC00" then response.write "selected"%>>#FFCC00</option>
		</select> 字体:
		<select size="1" name="FontModes">
		<option value="0" <%if rs22("titleFont")="0" then response.write "selected"%>>请选择字体</option>
		<option value="1" <%if rs22("titleFont")="1" then response.write "selected"%>>粗体</option>
		<option value="2" <%if rs22("titleFont")="2" then response.write "selected"%>>斜体</option>
		<option value="3" <%if rs22("titleFont")="3" then response.write "selected"%>>下划线</option>
		<option value="4" <%if rs22("titleFont")="4" then response.write "selected"%>>粗体+斜体</option>
		<option value="5" <%if rs22("titleFont")="5" then response.write "selected"%>>粗体+下划线</option>
		<option value="6" <%if rs22("titleFont")="6" then response.write "selected"%>>斜体+下划线</option>
		
		</select>





</td>
</tr>





<tr>
<td width="165" height="30" align="center" bgcolor="#ffffff">所属父文章(父文章将作为分类)  </td>
<td width="565" height="30" align="left" bgcolor="#EDF8FE">



<select size="1" name="classid">


<option value="xx" >作为一级文章</option>
<%

call next_cen("",0)




%>
</select>




</td>
</tr>








<tr>
<td width="165" height="30" align="center" bgcolor="#ffffff">顺序号:  </td>
<td width="565" height="30" align="left" bgcolor="#EDF8FE">
<input type="text" size=10 value="<%=rs22("orders")%>" name="orders"/>

</td>
</tr>








<tr>
<td width="165" height="30" align="center" bgcolor="#ffffff">连接目标:  </td>
<td width="565" height="30" align="left" bgcolor="#EDF8FE">
<input type="radio" value="0" name="LinkTarget" <%if rs22("is_open_use_blank")="0" then response.write "checked"%>> 本窗口打开&nbsp;&nbsp; 
		<input type="radio" name="LinkTarget" value="1" <%if rs22("is_open_use_blank")="1" then response.write "checked"%>> 新窗口打开

</td>
</tr>





<tr>
<td width="165" height="30" align="center" bgcolor="#ffffff">是否转向连接:  </td>
<td width="565" height="30" align="left" bgcolor="#EDF8FE">
<input type="radio" name="isoutLink"  value="0"  onclick="show1(0)" <%if rs22("is_link_class")="0" then response.write "checked"%>> 否&nbsp;&nbsp; 
		<input type="radio" name="isoutLink"  onclick="show1(1)" value="1" <%if rs22("is_link_class")="1" then response.write "checked"%>> 是

</td>
</tr>





<tr  id="classurl1" style="display:none">
<td width="165" height="30" align="center" bgcolor="#ffffff">转向连接URL  </td>
<td width="565" height="30" align="left" bgcolor="#EDF8FE">
<input type="text" name="TurnLinkUrl" size="45" value="<%=rs22("outlink")%>">

</td>
</tr>


<script  language="javascript">
sss=document.getElementById("classurl1");
<%if rs22("is_link_class")="1" then response.write "sss.style.display='';"%>


</script>










<tr>
<td width="165" height="30" align="center" bgcolor="#ffffff"><b>上传图片:</b></td>
          <td width="720" align="left" bgcolor="#EDF8FE" colspan="3"><iframe name="image" frameborder="0" width='100%' height="69" scrolling="no" src="../D_upfile.asp"></iframe></td>



 </tr>





<tr>
<td width="165" height="30" align="center" bgcolor="#ffffff">文章内容 <br>文章内容分页标签<br>[page_fenye]<br>请注意标签字母小写 </td>
<td width="565" height="30" align="left" bgcolor="#EDF8FE">


<textarea name="Content" id="Content" style="display:none"><%=replace(replace_textare_for_editor(Rs22("content")&""),"%",chr(37))%></textarea>



<script type="text/javascript">
<!--


var oFCKeditor = new FCKeditor('Content') ;
oFCKeditor.BasePath = '../../ND_editor/FCKeditor2_5/' ;
oFCKeditor.ToolbarSet = 'Default' ;
oFCKeditor.Width = '600' ;
oFCKeditor.Height = '500' ;
oFCKeditor.Value = '' ;
oFCKeditor.ReplaceTextarea() ;

var oEditorb;

function FCKeditor_OnComplete( editorInstance )
{
	//alert("3423");
		oEditorb = FCKeditorAPI.GetInstance('Content') ;
		
}

function updatefck(str){

oEditorb.SetHTML(str);

}

//-->


</script>





</td>
</tr>






<tr>
<td width="165" height="30" align="center" bgcolor="#ffffff"><b>保存远程图片:</b></td>
<td width="565" height="30" align="left" bgcolor="#EDF8FE">

			<input name="AutoRemote" type="button" onClick="remoteUpload(1);" value='开始保存远程图片'> 
			</td>
 </tr>








<tr>
<td width="163" height="74" align="center" bgcolor="#ffffff"><b>首页图片:</b></td>
   <td width="720" colspan="3" align="left" valign="top" bgcolor="#B0E1FB"><input name="ImageUrl" type="text" id="ImageUrl" size="60" value="<%=Rs22("index_page_pic")%>" onpropertychange="document.all.pre.src=this.value;">
			<input type="hidden" name="UploadFileList" id="UploadFileList" onChange="doChange(this,document.myform.ImageFileList)" value="<%=Rs22("Uploadfile_list")%>">&nbsp;&nbsp;
			
			
			
			
			
			
			
			
			<br>直接从上传图片中选择:
			
			<%
			
			
			
Function Initpics(UploadFileList, ImageUrl)
	Dim i
	InitSelect = "<select name='ImageFileList' onChange=""ImageUrl.value=this.value;"">"
	InitSelect = InitSelect & "<option value=''>不选择首页推荐图片</option>"
	If Not IsNull(UploadFileList) Then
		UploadFileList = Split(UploadFileList, "|")
		For i = 0 To UBound(UploadFileList)
			If UploadFileList(i) <> "" Then
				InitSelect = InitSelect & "<option value=""" & UploadFileList(i) & """"
				If UploadFileList(i) = ImageUrl Then
					InitSelect = InitSelect & " selected"
				End If
				InitSelect = InitSelect & ">" & UploadFileList(i) & "</option>"
			End If
		Next
	End If
	Initpics = InitSelect & "</select>"
End Function
			
			
			response.write  Initpics(Rs22("Uploadfile_list"),Rs22("index_page_pic"))
			%>
			
			
			
			
			
			
			<input type='button' name='selectpic' value='从已上传图片中选择' onclick='SelectPic()' class="button">&nbsp;&nbsp;			<br />
			预览:<img src="<%=Rs22("index_page_pic")%>" width="80" height="72" id="pre"/></td>
        </tr>
















<tr>
<td width="700" align="center" colspan="2">

<input type="hidden" name="id"  value="<%=request("id")%>">

<input type="hidden" name="sys_content_type"  value="<%=request("sys_content_type")%>">


<input type="button" onClick="javascript:history.go(-1)" value="返回上一页" name="B1" class=Button>&nbsp;&nbsp;
		<input type="submit" value="修 改" name="B2" class=Button>
</td>

</tr>




</table>


</td>
</tr>
</table>

</form>
</div>



<form name="remoteuploadb" id="remoteuploadb" action="../D_remoteupload.asp" method="post" target="remoteupload">
<input type="hidden" name="content_UploadText" value=""/>
</form>
<iframe name="remoteupload" width="0" height="0"></iframe>






<script language=javascript>
AJAXfade(1,'l_list')
</script>


<%
AJAXcloseLoader()
%>